<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<script type="text/javascript" src="http://localhost/dreamweaver/infinitus/js/jquery-latest.js"></script>
<script type="text/javascript" src="http://localhost/dreamweaver/infinitus/js/jquery.validate.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
      $("#frmSuscripcion").validate({
        rules: {
          user_name: "required",
          user_email:{required: true, email: true}
		}
      });
    });
</script>

<style>
.csslabel
{
	float:left;
	width:75px;
}
.cssinput
{
	float:left;
	width:75px;
}
.csssubmit
{
}
.cssfila
{
	height:30px;
}

#msg_suscripcion
{
	color:Red;
	font-weight:bold;
}
</style>

<form action="http://localhost/dreamweaver/infinitus/suscriptor.php" method="post" name="frmSuscripcion" id="frmSuscripcion">
<h2>Deseo recibir informe especial</h2>

<div class="cssfila">
<div class="csslabel"><span class="xlabel">Nombre :</span></div>
<div class="cssinput"><span class="xinput"><input id="user_name" name="user_name" type="text" size="20" /></span></div>
</div>

<div class="cssfila">
<div class="csslabel"><span class="xlabel">Correo :</span></div>
<div class="cssinput"><span class="xinput"><input id="user_email" name="user_email" type="text" size="20" /></span></div>
</div>

<input type="hidden" name="MM_idcampanna" value="2" />
<input type="hidden" name="MM_insert_suscriptor" value="frmSuscripcion" />
<input type="hidden" name="MM_url_redirect_suscripcion_bienvenida" value="" />
<input type="hidden" name="MM_url_redirect_suscripcion_error" value="" />

	<script language="JavaScript">
    function waitplease(){
        document.getElementById("msg_suscripcion").innerHTML=document.getElementById("user_name").value+" por favor espera unos segundos....Gracias";
    }
    </script>
    <p id="msg_suscripcion"> </p>
    <input class="submit" type="submit" value="Enviar datos" onclick="waitplease()" />

	<script language="JavaScript">
     // get the current URL
     var url = window.location.toString();
     //get the parameters
     url.match(/\?(.+)$/);
     var params = RegExp.$1;
     // split up the query string and store in an
     // associative array
     var params = params.split("&");
     var queryStringList = {};

	if(params.length>0){
		 for(var i=0;i<params.length;i++)
		 {
			var tmp = params[i].split("=");
			queryStringList[tmp[0]] = unescape(tmp[1]);
		 }

		 // print all querystring in key value pairs
		 for(var i in queryStringList){
			if(i=="msg_suscripcion"){
				document.getElementById("msg_suscripcion").innerHTML=queryStringList[i];
			}
		 }
	}
     </script>
</form>

</body>
</html>